home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / activate.zip / ACTIVATE.H < prev    next >
C/C++ Source or Header  |  1992-12-04  |  939b  |  55 lines

  1. /*
  2.  * Activate.h
  3.  *
  4.  * Header file for Activate.c
  5.  *
  6.  */
  7.  
  8.  
  9. #define NUMBER_OF_SYSTEM_TYPES    32
  10. #define BAD_COMMAND_LINE     1
  11. #define BAD_PARTITION_NUMBER     2
  12.  
  13. #include <ctype.h>
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <string.h>
  17.  
  18.  
  19. typedef unsigned char byte;
  20.  
  21. typedef struct
  22. {
  23.   byte boot_flag;
  24.   byte start_sector_head;
  25.   byte start_sector;
  26.   byte start_cylinder;
  27.   byte ID;
  28.   byte end_sector_head;
  29.   byte end_sector;
  30.   byte end_cylinder;
  31.   long sectors_in_preceding_partn;
  32.   long sectors_in_partn;
  33. } partition_table_entry;
  34.  
  35. typedef struct
  36. {
  37.   partition_table_entry entry[4];
  38.   byte signature[2];                    /* Should be 55 AA for valid disk */
  39. } partition_table;
  40.  
  41. typedef struct
  42. {
  43.   byte ID;
  44.   char *Desc;
  45. } systypes;
  46.  
  47. typedef struct
  48. {
  49.   byte Side;
  50.   int  Cylinder;
  51.   byte Sector;
  52. } location;
  53.  
  54. extern byte buffer[];                                 /* stores 1st sector */
  55.